package com.example.service.impl;

import com.example.mapper.VisitorMapper;
import com.example.service.VisitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VisitorServiceImpl implements VisitorService {

    @Autowired
    private VisitorMapper visitorMapper;
    @Override
    public void addVisitorRecord(Integer id) {
        // 1. 更新数据库：该景点的访客量+1
        visitorMapper.incrementVisitor(id);

    }
}